package com.tzxs.pay.util;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.tzxs.pay.R;
import com.uuzuche.lib_zxing.activity.CaptureFragment;

public class MCaptureFragment extends CaptureFragment {


    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {

        View view = super.onCreateView(inflater, container, savedInstanceState);
        if (view != null)
            view.findViewById(R.id.cancel).setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {

                    Log.d("MCaptureFragment", "onClick: 进入点击事件::+++===");
                    MCaptureFragment.super.getActivity().finish();
                }
            });

        return view;
    }
}
